3.5.43 \(\int (f x)^m (a+b \log (c x^n)) \, dx\) [443]

Optimal. Leaf size=46 \[ -\frac {b n (f x)^{1+m}}{f (1+m)^2}+\frac {(f x)^{1+m} \left (a+b \log \left (c x^n\right )\right )}{f (1+m)} \]

[Out]

-b*n*(f*x)^(1+m)/f/(1+m)^2+(f*x)^(1+m)*(a+b*ln(c*x^n))/f/(1+m)

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 46, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.062, Rules used = {2341} \begin {gather*} \frac {(f x)^{m+1} \left (a+b \log \left (c x^n\right )\right )}{f (m+1)}-\frac {b n (f x)^{m+1}}{f (m+1)^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(f*x)^m*(a + b*Log[c*x^n]),x]

[Out]

-((b*n*(f*x)^(1 + m))/(f*(1 + m)^2)) + ((f*x)^(1 + m)*(a + b*Log[c*x^n]))/(f*(1 + m))

Rule 2341

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[(d*x)^(m + 1)*((a + b*Log[c*x^
n])/(d*(m + 1))), x] - Simp[b*n*((d*x)^(m + 1)/(d*(m + 1)^2)), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[m, -1
]

Rubi steps

\begin {align*} \int (f x)^m \left (a+b \log \left (c x^n\right )\right ) \, dx &=-\frac {b n (f x)^{1+m}}{f (1+m)^2}+\frac {(f x)^{1+m} \left (a+b \log \left (c x^n\right )\right )}{f (1+m)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 32, normalized size = 0.70 \begin {gather*} \frac {x (f x)^m \left (a+a m-b n+b (1+m) \log \left (c x^n\right )\right )}{(1+m)^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(f*x)^m*(a + b*Log[c*x^n]),x]

[Out]

(x*(f*x)^m*(a + a*m - b*n + b*(1 + m)*Log[c*x^n]))/(1 + m)^2

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 3.
time = 0.02, size = 371, normalized size = 8.07

method result size
risch \(\frac {b x \,{\mathrm e}^{\frac {m \left (-i \pi \mathrm {csgn}\left (i f x \right )^{3}+i \pi \mathrm {csgn}\left (i f x \right )^{2} \mathrm {csgn}\left (i f \right )+i \pi \mathrm {csgn}\left (i f x \right )^{2} \mathrm {csgn}\left (i x \right )-i \pi \,\mathrm {csgn}\left (i f x \right ) \mathrm {csgn}\left (i f \right ) \mathrm {csgn}\left (i x \right )+2 \ln \left (x \right )+2 \ln \left (f \right )\right )}{2}} \ln \left (x^{n}\right )}{1+m}-\frac {\left (i \pi b \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right ) m -i \pi b \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} m -i \pi b \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} m +i \pi b \mathrm {csgn}\left (i c \,x^{n}\right )^{3} m +i b \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )-i b \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}-i b \pi \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}+i b \pi \mathrm {csgn}\left (i c \,x^{n}\right )^{3}-2 b \ln \left (c \right ) m -2 b \ln \left (c \right )-2 a m +2 b n -2 a \right ) x \,{\mathrm e}^{\frac {m \left (-i \pi \mathrm {csgn}\left (i f x \right )^{3}+i \pi \mathrm {csgn}\left (i f x \right )^{2} \mathrm {csgn}\left (i f \right )+i \pi \mathrm {csgn}\left (i f x \right )^{2} \mathrm {csgn}\left (i x \right )-i \pi \,\mathrm {csgn}\left (i f x \right ) \mathrm {csgn}\left (i f \right ) \mathrm {csgn}\left (i x \right )+2 \ln \left (x \right )+2 \ln \left (f \right )\right )}{2}}}{2 \left (1+m \right )^{2}}\) \(371\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((f*x)^m*(a+b*ln(c*x^n)),x,method=_RETURNVERBOSE)

[Out]

b/(1+m)*x*exp(1/2*m*(-I*Pi*csgn(I*f*x)^3+I*Pi*csgn(I*f*x)^2*csgn(I*f)+I*Pi*csgn(I*f*x)^2*csgn(I*x)-I*Pi*csgn(I
*f*x)*csgn(I*f)*csgn(I*x)+2*ln(x)+2*ln(f)))*ln(x^n)-1/2*(I*Pi*b*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)*m-I*Pi*b*c
sgn(I*c)*csgn(I*c*x^n)^2*m-I*Pi*b*csgn(I*x^n)*csgn(I*c*x^n)^2*m+I*Pi*b*csgn(I*c*x^n)^3*m+I*csgn(I*c*x^n)*csgn(
I*x^n)*b*Pi*csgn(I*c)-I*csgn(I*c*x^n)^2*csgn(I*c)*b*Pi-I*csgn(I*c*x^n)^2*csgn(I*x^n)*b*Pi+I*csgn(I*c*x^n)^3*b*
Pi-2*b*ln(c)*m-2*b*ln(c)-2*a*m+2*b*n-2*a)/(1+m)^2*x*exp(1/2*m*(-I*Pi*csgn(I*f*x)^3+I*Pi*csgn(I*f*x)^2*csgn(I*f
)+I*Pi*csgn(I*f*x)^2*csgn(I*x)-I*Pi*csgn(I*f*x)*csgn(I*f)*csgn(I*x)+2*ln(x)+2*ln(f)))

________________________________________________________________________________________

Maxima [A]
time = 0.30, size = 57, normalized size = 1.24 \begin {gather*} -\frac {b f^{m} n x x^{m}}{{\left (m + 1\right )}^{2}} + \frac {\left (f x\right )^{m + 1} b \log \left (c x^{n}\right )}{f {\left (m + 1\right )}} + \frac {\left (f x\right )^{m + 1} a}{f {\left (m + 1\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x)^m*(a+b*log(c*x^n)),x, algorithm="maxima")

[Out]

-b*f^m*n*x*x^m/(m + 1)^2 + (f*x)^(m + 1)*b*log(c*x^n)/(f*(m + 1)) + (f*x)^(m + 1)*a/(f*(m + 1))

________________________________________________________________________________________

Fricas [A]
time = 0.37, size = 52, normalized size = 1.13 \begin {gather*} \frac {{\left ({\left (b m + b\right )} n x \log \left (x\right ) + {\left (b m + b\right )} x \log \left (c\right ) + {\left (a m - b n + a\right )} x\right )} e^{\left (m \log \left (f\right ) + m \log \left (x\right )\right )}}{m^{2} + 2 \, m + 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x)^m*(a+b*log(c*x^n)),x, algorithm="fricas")

[Out]

((b*m + b)*n*x*log(x) + (b*m + b)*x*log(c) + (a*m - b*n + a)*x)*e^(m*log(f) + m*log(x))/(m^2 + 2*m + 1)

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 141 vs. \(2 (37) = 74\).
time = 5.07, size = 141, normalized size = 3.07 \begin {gather*} \begin {cases} \frac {a m x \left (f x\right )^{m}}{m^{2} + 2 m + 1} + \frac {a x \left (f x\right )^{m}}{m^{2} + 2 m + 1} + \frac {b m x \left (f x\right )^{m} \log {\left (c x^{n} \right )}}{m^{2} + 2 m + 1} - \frac {b n x \left (f x\right )^{m}}{m^{2} + 2 m + 1} + \frac {b x \left (f x\right )^{m} \log {\left (c x^{n} \right )}}{m^{2} + 2 m + 1} & \text {for}\: m \neq -1 \\\frac {\begin {cases} a \log {\left (x \right )} & \text {for}\: b = 0 \\- \left (- a - b \log {\left (c \right )}\right ) \log {\left (x \right )} & \text {for}\: n = 0 \\\frac {\left (- a - b \log {\left (c x^{n} \right )}\right )^{2}}{2 b n} & \text {otherwise} \end {cases}}{f} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x)**m*(a+b*ln(c*x**n)),x)

[Out]

Piecewise((a*m*x*(f*x)**m/(m**2 + 2*m + 1) + a*x*(f*x)**m/(m**2 + 2*m + 1) + b*m*x*(f*x)**m*log(c*x**n)/(m**2
+ 2*m + 1) - b*n*x*(f*x)**m/(m**2 + 2*m + 1) + b*x*(f*x)**m*log(c*x**n)/(m**2 + 2*m + 1), Ne(m, -1)), (Piecewi
se((a*log(x), Eq(b, 0)), (-(-a - b*log(c))*log(x), Eq(n, 0)), ((-a - b*log(c*x**n))**2/(2*b*n), True))/f, True
))

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 95 vs. \(2 (46) = 92\).
time = 2.53, size = 95, normalized size = 2.07 \begin {gather*} \frac {b f^{m} m n x x^{m} \log \left (x\right )}{m^{2} + 2 \, m + 1} + \frac {b f^{m} n x x^{m} \log \left (x\right )}{m^{2} + 2 \, m + 1} - \frac {b f^{m} n x x^{m}}{m^{2} + 2 \, m + 1} + \frac {\left (f x\right )^{m} b x \log \left (c\right )}{m + 1} + \frac {\left (f x\right )^{m} a x}{m + 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x)^m*(a+b*log(c*x^n)),x, algorithm="giac")

[Out]

b*f^m*m*n*x*x^m*log(x)/(m^2 + 2*m + 1) + b*f^m*n*x*x^m*log(x)/(m^2 + 2*m + 1) - b*f^m*n*x*x^m/(m^2 + 2*m + 1)
+ (f*x)^m*b*x*log(c)/(m + 1) + (f*x)^m*a*x/(m + 1)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int {\left (f\,x\right )}^m\,\left (a+b\,\ln \left (c\,x^n\right )\right ) \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((f*x)^m*(a + b*log(c*x^n)),x)

[Out]

int((f*x)^m*(a + b*log(c*x^n)), x)

________________________________________________________________________________________